# 迭代：遍历-for in
for i in [1,2,3,4,5,]:
    pass

#首先获得Iterator对象：
it = iter([1,2,3,4,5])
#循环
while True:
    try:
        #获得下一值
        x = next(it)
    except StopIteration:
        #遇到Stopiteration就退出循环
        break